package com.intretech.umsin.common.entity;

import java.io.Serializable;
import java.util.List;

/**
 * @version V1.0
 * @ClassName: PageResult
 * @Description: PageResult 自定义分页对象
 * @author: 李启联
 * @date: 2022-04-24 15:21
 * @Copyright: Copyright (c) 2022
 */
public class PageResult<T> implements Serializable {

    protected List<T> records;
    protected long total;
    protected long size;
    protected long current;

    public List<T> getRecords() {
        return records;
    }

    public void setRecords(List<T> records) {
        this.records = records;
    }

    public long getTotal() {
        return total;
    }

    public void setTotal(long total) {
        this.total = total;
    }

    public long getSize() {
        return size;
    }

    public void setSize(long size) {
        this.size = size;
    }

    public long getCurrent() {
        return current;
    }

    public void setCurrent(long current) {
        this.current = current;
    }

    public PageResult(List<T> records, long total, long size, long current) {
        this.records = records;
        this.total = total;
        this.size = size;
        this.current = current;
    }

    @Override
    public String toString() {
        return "PageResult{" +
                "records=" + records +
                ", total=" + total +
                ", size=" + size +
                ", current=" + current +
                '}';
    }
}
